/**
 * Copyright (C) 2012 The SkyTvOS Project
 * <p/>
 * Version     Date           Author
 * ─────────────────────────────────────
 * 2014年12月30日         luwei
 */

package com.coocaa.launcher.framework.sidebar.item;

import android.content.Context;

import com.coocaa.app.gamecenter.pages.list.GameListItem;
import com.coocaa.app.gamecenter.pages.mygame.MyGameItem;
import com.coocaa.launcher.framework.sidebar.ItemContainer.IItem;
import com.coocaa.launcher.sidebar.left.item.appcircle.AppCircle;
import com.coocaa.launcher.sidebar.left.item.movie.Movie;
import com.coocaa.launcher.sidebar.left.item.qrcode.QrCode;
import com.coocaa.launcher.sidebar.left.item.setting.Setting;
import com.coocaa.launcher.sidebar.left.item.source.Source;
import com.coocaa.launcher.sidebar.left.item.speedup.SpeedUp;
import com.coocaa.launcher.sidebar.left.item.theme.Theme;
import com.coocaa.launcher.sidebar.left.item.usb.Usb;
import com.coocaa.launcher.sidebar.left.item.wallpaper.Wallpaper;
import com.coocaa.launcher.sidebar.setting.item.about.About;
import com.coocaa.launcher.sidebar.setting.item.autostart.AutoStart;
import com.coocaa.launcher.sidebar.setting.item.backexit.BackExit;
import com.coocaa.launcher.sidebar.setting.item.common.Common;
import com.coocaa.launcher.sidebar.setting.item.custom.Custom;
import com.coocaa.launcher.sidebar.setting.item.defaultlauncher.DefaultLauncher;
import com.coocaa.launcher.sidebar.setting.item.deviceinfo.DeviceInfo;
import com.coocaa.launcher.sidebar.setting.item.tvsetting.TvSetting;
import com.coocaa.launcher.sidebar.setting.item.update.Update;
import com.coocaa.launcher.sidebar.setting.item.wallpaper.InnerWallpaper;
import com.coocaa.launcher.sidebar.setting.item.wallpaper.LocalWallpaper;

public class ItemFactory {

    public enum ITEM {
        SPEED_UP,
        SETTING,
        APP_CIRCLE,
        THEME,
        MULTI_SCREEN,
        CUSTOM,
        DEFAULT_LAUNCHER,
        ABOUT_US,
        DEVICE_INFO,
        UPDATE,
        WALLPAPER,
        INNER_WALLPAPER,
        LOCAL_WALLPAPER,
        AUTO_START,
        BACK_EXIT,
        EXTRAL_USB,
        SOURCE,
        MOVIE,
        TV_SETTING,
        GAME_LIST,
        MY_GAME,
        COMMON,
        NET_SETTING,
        WIFI_SETTING,
        SYS_SETTING,
        SYS_UPGRADE,
        RECOVERY,
        LOCAL_INFO,
        GAME_CENTER
    }

    public static IItem createItem(ITEM item, Context context) {
        IItem iitem = null;
        switch (item) {
            case SPEED_UP:
                return new SpeedUp(context);
            case SETTING:
                return new Setting(context);
            case APP_CIRCLE:
                return new AppCircle(context);
            case THEME:
                return new Theme(context);
            case MULTI_SCREEN:
                return new QrCode(context);
            case CUSTOM:
                return new Custom(context);
            case DEFAULT_LAUNCHER:
                return new DefaultLauncher(context);
            case ABOUT_US:
                return new About(context);
            case DEVICE_INFO:
                return new DeviceInfo(context);
            case UPDATE:
                return new Update(context);
            case INNER_WALLPAPER:
                iitem = new InnerWallpaper(context);
                iitem.setType(ITEM.INNER_WALLPAPER);
                return iitem;
            case LOCAL_WALLPAPER:
                iitem = new LocalWallpaper(context);
                iitem.setType(ITEM.LOCAL_WALLPAPER);
                return iitem;
            case WALLPAPER:
                return new Wallpaper(context);
            case AUTO_START:
                return new AutoStart(context);
            case BACK_EXIT:
                return new BackExit(context);
            case EXTRAL_USB:
                return new Usb(context);
            case SOURCE:
                return new Source(context);
            case MOVIE:
                return new Movie(context);
            case TV_SETTING:
                return new TvSetting(context);
            case GAME_LIST:
                return new GameListItem(context);
            case MY_GAME:
                return new MyGameItem(context);
            case COMMON:
                return new Common(context);
            default:
                break;
        }
        return null;
    }
}
